package com.example.demo.Entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 *  此处编辑健康记录
 *
 * 必要的信息有： UUID 地点，检查人，被检查人，被检查人体温，时间
 *
 * 非必要信息有： 备注
 *
 * userName 指定是 真实名字
* */

@Entity
@Data
@Table(name = "record")
@NoArgsConstructor
@AllArgsConstructor
public class Record implements Serializable {

    public static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy  =  GenerationType.IDENTITY)
    @ExcelProperty(value = "索引", index = 0)
    private long Id;                            //主键Id
    @Column(name = "record_date")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @ExcelProperty(value = "日期", index = 7)
    private Date recordDate = new Date();
    @ExcelProperty(value = "索引", index = 6)
    @Column(name = "temperature")
    private Double temperature;
    @Column(name = "area")
    @ExcelProperty(value = "地区", index = 5)
        private String area;
    @ExcelProperty(value = "用户微信号", index = 4)
    @Column(name = "userOpenId")
    private String userOpenId;
    @Column(name = "userName")
    @ExcelProperty(value = "用户名", index = 3)
        private String userName;
    @ExcelProperty(value = "工作者微信号", index = 2)
    @Column(name = "workerOpenId")
    private String workerOpenId;
    @Column(name = "workerName")
    @ExcelProperty(value = "工作者姓名", index = 1)
    private String workerName;





}
